import { useMessage } from '/@/hooks/web/useMessage';
import { store } from '../index';
import SwMessage from '/@/businessComponents/SwMessage/index';

const { createMessage } = useMessage()
export const messageFn = (type: string, message: string, duration?: number) =>{
    // createMessage[type](message);
    SwMessage({ type, message, duration })
}

export const resetPinia = () => {
  store._s.forEach(item => {
    if (!item.$id.includes('app')) {
      item.$reset()
    }
  })
}
